Episode classifier algorithm

ABSTRACT

The present disclosure is directed to the classification of cardiac episodes using an algorithm. In various examples, an episode classification algorithm evaluates electrogram signal data collected by an implantable medical device. The episode classification algorithm may classify may include a sinus template and a comparison of the electrogram signal to the sinus template. Possible classifications of the cardiac episode may include, for example, unknown, inappropriate, appropriate, supraventricular tachycardia, ventricular tachycardia, ventricular fibrillation or ventricular over-sensing.

TECHNICAL FIELD

The invention relates to an algorithm for classifying cardiac episodesdetected by an implantable medical device (IMD).

BACKGROUND

Some implantable medical devices (IMDs) monitor physiological parametersor signals of the patients within which they are implanted. Suchimplantable medical devices may detect episodes based on the monitoring.An IMD may store a variety of data regarding detected episodes, and aclinician may retrieve the episode data from the IMD for diagnosing thepatient and/or confirming the accuracy of the detection of the episodesby the IMD. For example, implantable cardioverter-defibrillators (ICDs)may detect cardiac episodes, such as tachyarrhythmia episodes, based onmonitoring cardiac electrogram signals and, in some cases, additionalphysiological signals or parameters. A clinician may review the datastored by the ICD for the episodes to confirm that accuracy of thediagnosis of tachyarrhythmia by the ICD.

As the memory capacity and diagnostic capabilities of IMDs, such asICDs, increases, the amount of time required to adequately review theretrieved data to determine whether the detection of episodes anddelivery of therapy by the device was appropriate also increases. Manualreview of episodes may be challenging because of the number of patientsa clinician follows, an increase in the total number of episodes toreview and the significant level of expertise required. Additionally,the time available for clinicians with expertise to review each episodehas been reduced. This may result in a reduction in the quality ofmanagement of those patients having implanted devices.

Automated algorithms for post-processing cardiac episodes previouslydetected by ICDs have been proposed to address these concerns. Suchalgorithms generally evaluate the cardiac electrogram and other datastored by an ICD for an episode to provide an independent classificationof the episode. The post-processing classification may be compared tothe classification made by the ICD to determine the accuracy of theclassification by the ICD. Such algorithms may potentially suggest ICDparameter changes and/or changes to medical therapy, such as changes inmedication, therapy delivery, use of ablation procedures, etc. Onealgorithm for automated algorithms for post-processing of cardiacepisodes is disclosed in U.S. Pat. No. 7,894,883 to Gunderson et al.,which is incorporated herein by reference in its entirety.

SUMMARY

In general, the disclosure describes techniques for improving episodeclassification during post-processing. In various examples consistentwith the present disclosure, an episode classification algorithm mayinclude, for example, a sinus template and a template matchingalgorithm.

In one example, a method comprises collecting a sinus template from afirst ventricular EGM signal, wherein the sinus template comprises aportion of the first ventricular EGM signal including at least oneventricular beat, and wherein collecting the sinus template comprisescollecting the sinus template from a portion of the ventricular EGM thatoccurred when the ventricular EGM signal and an atrial EGM signalindicated a one to one ratio of atrial events to ventricular events, aP-R interval greater than a first predetermined threshold, an R-Rinterval greater than a second predetermined threshold, and twoconsecutive R-R intervals within a predetermined range. The methodfurther includes comparing the sinus template to a second ventricularEGM signal, and determining, based on the comparison, whether themorphology of the second ventricular EGM signal matches the sinustemplate.

In another example, the disclosure is directed to a processor configuredto collect a sinus template from a first ventricular EGM signal, whereinthe sinus template comprises a portion of the first ventricular EGMsignal including at least one ventricular beat, and wherein collectingthe sinus template comprises collecting the sinus template from aportion of the ventricular EGM that occurred when the ventricular EGMsignal and an atrial EGM signal indicated a one to one ratio of atrialevents to ventricular events, a P-R interval greater than a firstpredetermined threshold, an R-R interval greater than a secondpredetermined threshold; and two consecutive R-R intervals within apredetermined range. The processor is further configured to compare thesinus template to a second ventricular EGM signal, and determine, basedon the comparison, whether the morphology of the second ventricular EGMsignal matches the sinus template.

In another example, the disclosure is directed to a device comprisingmeans for collecting a sinus template from an EGM signal; the sinustemplate collected when the EGM signal has a one to one ratio of atrialevents to ventricular events, a P-R interval greater than 80milliseconds (ms), an R-R interval greater than 500 ms; and twoconsecutive R-R intervals within 50 ms of each other; means forcomparing the sinus ventricular beat template to a second EGM signal,and means for determining, based on the comparison, whether themorphology of the second EGM signal matches the sinus template.

In another embodiment, the invention is directed to a computer-readablemedium containing instructions. The instructions cause a programmableprocessor to collect a sinus template from a first ventricular EGMsignal, wherein the sinus template comprises a portion of the firstventricular EGM signal including at least one ventricular beat, andwherein collecting the sinus template comprises collecting the sinustemplate from a portion of the ventricular EGM that occurred when theventricular EGM signal and an atrial EGM signal indicated a one to oneratio of atrial events to ventricular events, a P-R interval greaterthan a first predetermined threshold, an R-R interval greater than asecond predetermined threshold; and two consecutive R-R intervals withina predetermined range, compare the sinus template to a secondventricular EGM signal, and determine, based on the comparison, whetherthe morphology of the second ventricular EGM signal matches the sinustemplate.

The details of one or more embodiments of the invention are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages of the invention will be apparent from thedescription and drawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram illustrating an example system forclassifying a cardiac episode consistent with an example of the presentdisclosure.

FIG. 2 is a conceptual diagram illustrating the implantable medicaldevice (IMD) and leads of the system shown in FIG. 1 in greater detail.

FIG. 3 is a block diagram illustrating an example IMD of FIG. 1.

FIG. 4 is a block diagram illustrating an example system that includesand external device, such as a server, and one or more computing devicesthat are coupled to the IMD and programmer shown in FIG. 1 via anetwork.

FIG. 5 is a block diagram illustrating an example programmer of FIG. 1.

FIG. 6A is a flow chart illustrating an example episode classificationalgorithm for an EGM signal on a near-field channel.

FIG. 6B is a flow chart illustrating an example episode classificationalgorithm for an EGM signal on a far-field channel.

FIG. 6C is a flow chart illustrating an example method of determining afinal classification for an episode classified on both a near-fieldchannel and a far-field channel.

FIG. 7 is a flow chart illustrating an example method of determining aclassification for an episode using a sinus rhythm template.

FIG. 8 is a flow chart illustrating an example method of classifying anepisode when the ratio of atrial sensed events and ventricular sensedevents is 1:1.

FIG. 9A is an example marker channel having a 1:1 ratio.

FIG. 9B is an example marker channel having a 1:1: ratio.

FIG. 10 is an example method for automatically selecting a sinustemplate after anti-tachycardia pacing (ATP).

FIG. 11 is an example method for automatically selecting a sinustemplate from a pre-onset EGM signal.

FIG. 12 is an example EGM signal including ATP and a selected sinustemplate.

FIG. 13 is an example pre-onset EGM signal including a selected sinustemplate.

DETAILED DESCRIPTION

This disclosure describes techniques for classifying cardiac episodes.In particular, the disclosure is describes techniques for an externaldevice to evaluate a prior classification of an episode by animplantable medical device (IMD). The techniques described below may beused alone or in combination.

In general, an IMD transmits electrogram (EGM) signal data or other dataassociated with a cardiac episode diagnosed by the IMD to an externalcomputing device. In some examples the data is transmitted after theepisode is over. In some examples, the data is transmitted atpredetermined intervals. The data stored by an IMD for a cardiac episodediagnosed by the IMD may include the diagnosis made by the IMD and dataleading up to diagnosis of the particular cardiac episode. In someexamples, IMD may include episodes resulting in either anti-tachycardiapacing or a shock in response to a diagnosis of either ventriculartachycardia or ventricular fibrillation. It is also possible that theIMD may have misdiagnosed a supraventricular tachycardia (SVT), such assinus tachycardia or an atrial arrhythmia, or noise as a treatable,i.e., shockable, episode.

In some examples, an external computing device analyzes the EGM signalthat was previously used by the IMD to classify an episode, andgenerates its own classification of the episode based on the EGM signal.In some examples, the external device determines whether theclassification of the episode by the IMD was correct by comparing itsclassification of the episode to that of the IMD. The techniquesdescribed below may reduce the number of episodes that the externaldevice is unable to classify with a reasonable degree of confidence.

In some examples, a post-processing classification algorithm may reducethe number of EGM episodes that are unable to be classified confidentlyby classifying an single episode based on information from both anear-field (NF) EGM channel and a far-field (FF) EGM channel. The use ofboth the NF and FF channels allows for classification even in instanceswhere one or the other channel would result in an unknownclassification. This more robust classification system compensates forover- or under-sensing or other sensing problems that may occur on oneof the two channels. Consistent with the present disclosure, the FF EGMchannel is given priority assuming that the episode on the FF EGMchannel is not classified as unknown by the algorithm. Additionally, insome examples where an episode is determined to include ventricularover-sensing (VOS) on either channel, then the final classification isventricular over-sensing, regardless of which channel is categorized asventricular over-sensing.

A post-processing classification algorithm using both a NF EGM channeland A FF EGM channel may be different in certain respects for eachchannel. For example, different thresholds may be used on the NF and FFchannel. In addition, when comparing a channel signal to a template, thetemplate may be specific to the channel.

In some examples, a post-processing classification algorithm mayadditionally or alternatively reduce the number of unknown EGM episodeby using a sinus tachycardia template. A sinus tachycardia template,referred to herein as a sinus template, is a template comprising one ormore ventricular or atrial beats, e.g., including one or more R-waves orP-waves, derived from ventricular electrogram data including one or morebeats during sinus rhythm. In some examples, an atrial template may beused to discriminate true P-waves from far-field R-waves detectedincorrectly by an IMD as P-waves.

Either an IMD device or an external device may capture a sinus templateautomatically based on a variety of characteristics. A sinus templatemay be automatically selected by an IMD or an external device based on anumber of factors which would lead to a conclusion that the cardiacrhythm underlying the candidate ventricular EGM data is a sinustachycardia, including a rhythm with a 1:1 ratio of atrial sensed(A_(s)) events to ventricular sensed (V_(s)) events, a PR (P-wave toR-wave) interval of greater than 80 milliseconds (ms), an RR (R-wave toR-wave) interval greater than 500 ms, and two consecutive RR intervalvalues within less than 50 ms of each other. The template may beselected either from a post ATP rhythm or from a pre-diagnosis rhythm,assuming the appropriate criteria are met.

A sinus template may also be selected from an episode that has beenclassified either by an IMD or an external computing device assupraventricular tachycardia. A ventricular beat leading up to diagnosisas SVT is selected and stored as a template. In some examples, templatesmay be stored for each channel providing an EGM signal. The templatesmay then be compared to EGM signals from the same respective channel.

The sinus template may be used by a post-processing algorithm todetermine whether the morphology of the beats within an episodecorresponds to the sinus template. If the morphologies match, theepisode is classified as supraventricular tachycardia (SVT). In someexamples, a different sinus template may be compared to beats for eachof a plurality of EGM signals associated with a particular cardiacepisode. Such a classification of an episode received from IMD by anexternal post-processing algorithm may indicate a misdiagnosis by theIMD.

A sinus template may also be used by an IMD for real-time detectiondecisions. In some examples, a sinus template is used either tostrengthen or make a detection decision within an IMD. If the currentventricular rate places the rhythm within the VT/VF zone, a currentventricular EGM beat morphology is compared to the sinus template. Ifthe current beat morphology and the sinus template match, then the IMDwithholds detection of VT/VF. If the two do not match, then IMDcontinues with a VT/VF detection algorithm.

The present disclosure also includes an example method of classifying anepisode when a 1:1 ratio of atrial sensed events to ventricular sensedevents is present. The method of classification may be used by an IMD inreal time to diagnosis a cardiac event, or by an external computingdevice to evaluate the diagnosis of an event by the IMD. When a 1:1ratio of atrial sensed events to ventricular sensed events is present, adetermination may be made as to whether there are changes in theinterval between atrial sensed events or the interval betweenventricular sensed events. In some examples this may be determined bylooking at consecutive PP intervals and consecutive RR intervals. Ifthere is a change in interval length outside of a range considered to benormal fluctuation, a determination may be made as to whether both theRR intervals and PP intervals are changing, and if they are changing inthe same direction. That is, if a change in one interval is followed bya corresponding change in the other interval.

If the same interval (e.g., PP or RR) leads the change consistently,then that interval is determined to be the leading interval. Based onthe leading interval, the associated chambers, either the atrium for aPP interval, or the ventricles for a RR interval, are determined to beleading the contractions of the heart. If the contractions areoriginating in the atrium, then the rhythm is classified as SVT. If therhythm is originating in the ventricles, the rhythm is classified as VTor VF.

The classification scheme based on leading interval may be used inconjunction with a greater classification algorithm, such as one usingboth a NF EGM channel and a FF EGM channel during a classification. Theleading interval classification scheme may also be used in conjunctionwith a classification algorithm that uses a sinus template.

In general, a post-processing classification may be used to evaluateprior classification of episodes by an IMD. An external device mayreprogram and/or make modification to the operation of the implantabledevice based on the reclassification of one or more episodes by theexternal device.

FIG. 1 is a conceptual diagram illustrating an example system 10 forclassifying a cardiac episode consistent with an example of the presentdisclosure. As illustrated in FIG. 1, a system for classifying episodesaccording to an example of the present disclosure includes animplantable medical device (IMD) 16, such as an implantable cardiacpacemaker, implantable cardioverter/defibrillator (ICD), orpacemaker/cardioverter/defibrillator, for example. IMD 16 is connectedto leads 18, 20 and 22 and is communicatively coupled to a programmer24.

IMD 16 senses electrical signal attendant to the depolarization andrepolarization of heart 12, e.g., a cardiac electrogram (EGM), viaelectrodes on one or more leads 18, 20 and 22 or the housing of IMD 16.IMD 16 may also deliver therapy in the form of electrical signals toheart 12 via electrodes located on one or more leads 18, 20 and 22 or ahousing of IMD 16, the therapy may be pacing, cardioversion and/ordefibrillation pulses. IMD 16 may monitor EGM signals collected byelectrodes on leads 18, 20 or 22, and based on the EGM signal diagnosisand treat cardiac episodes.

Programmer 24, or another external computing device, may evaluate theclassifications made by IMD 16. A system for classifying episodesaccording to the present disclosure may additionally or alternativelyinclude other medical devices, such as a cardiomyostimulator, a drugdelivery system, cardiac and other physiological monitors, electricalstimulators including nerve, muscle and deep brain stimulators, cochlearimplants and heart assist IMDs or pumps, for example.

Leads 18, 20, 22 extend into the heart 12 of patient 14 to senseelectrical activity of heart 12 and/or deliver electrical stimulation toheart 12. In the example shown in FIG. 1, right ventricular (RV) lead 18extends through one or more veins (not shown), the superior vena cava(not shown), and right atrium 26, and into right ventricle 28. Leftventricular (LV) coronary sinus lead 20 extends through one or moreveins, the vena cava, right atrium 26, and into the coronary sinus 30 toa region adjacent to the free wall of left ventricle 32 of heart 12.Right atrial (RA) lead 22 extends through one or more veins and the venacava, and into the right atrium 26 of heart 12. In some examples, theleads may be placed in different locations. For example, at least onelead may be on the outside of the heart. Although shown with leads 18,20 and 22, in some examples IMD 16 may be include more or less leads.

In some examples, programmer 24 takes the form of a handheld computingdevice, mobile device, computer workstation or networked computingdevice that includes a user interface for presenting information to andreceiving input from a user A user, such as a physician, technician,surgeon, electro-physiologist, or other clinician, may interact withprogrammer 24 to retrieve physiological or diagnostic information fromIMD 16. A user may also interact with programmer 24 to program IMD 16,e.g., select values for operational parameters of the IMD. Programmer 24may include a processor configured to evaluate EGM signals transmittedfrom IMD 16 to programmer 24. In some examples, as described in greaterdetail below, programmer 24 may evaluate a prior classification of anepisode by IMD 16.

IMD 16 and programmer 24 may communicate via wireless communicationusing any techniques known in the art. Examples of communicationtechniques may include, for example, low frequency or radiofrequency(RF) telemetry. Other techniques are also contemplated. In someexamples, programmer 24 may include a programming head that may beplaced proximate to the patient's body near the IMD 16 implant site inorder to improve the quality or security of communication between IMD 16and programmer 24. In some examples, programmer 24 may be locatedremotely from IMD 16, and communicate with IMD 16 via a network.Programmer 24 may also communicate with one or more other externaldevices using a number of known communication techniques, both wired andwireless.

In some examples, data acquired by IMD 16 can be monitored by anexternal system, such as the programmer 24. The classification ofcardiac episodes according to an example of the present disclosure maytake place in the programmer 24 once the required data is transmittedfrom IMD 16 to the programmer 24. IMD 16 may provide both a near-fieldand a far-field EGM signals to programmer 24. In some examples,programmer 24 or IMD 16 may transmit the required data to anotherexternal device, not shown in FIG. 1, for processing and classification.

FIG. 2 is a conceptual diagram illustrating IMD 16 and leads 18, 20 and22 of system 10 in greater detail. In the illustrated example, bipolarelectrodes 40 and 42 are located adjacent to a distal end of lead 18. Inaddition, bipolar electrodes 44 and 46 are located adjacent to a distalend of lead 20, and bipolar electrodes 48 and 50 are located adjacent toa distal end of lead 22. In alternative embodiments, not shown in FIG.2, one or more of leads 18, 20 and 22, e.g., left-ventricular lead 20,may include quadrapole electrodes located adjacent to a distal end ofthe lead.

In the illustrated example, electrodes 40, 44 and 48 take the form ofring electrodes, and electrodes 42, 46 and 50 may take the form ofextendable helix tip electrodes mounted retractably within insulativeelectrode heads 52, 54 and 56, respectively. Leads 18, 20, 22 alsoinclude elongated electrodes 62, 64, 66, respectively, which may takethe form of a coil. In some examples, each of electrodes 40, 42, 44, 46,48, 50, 62, 64 and 66 is electrically coupled to a respective conductorwithin the lead body of its associated lead 18, 20, 22 and therebycoupled to circuitry within IMD 16.

In some examples, IMD 16 includes one or more housing electrodes, suchas housing electrode 4 illustrated in FIG. 2, which may be formedintegrally with an outer surface of hermetically-sealed housing 8 of IMD16 or otherwise coupled to housing 8. In some examples, housingelectrode 4 is defined by an uninsulated portion of an outward facingportion of housing 8 of IMD 16. Other divisions between insulated anduninsulated portions of housing 8 may be employed to define two or morehousing electrodes. In some examples, a housing electrode comprisessubstantially all of housing 8.

Housing 8 encloses a signal generator that generates therapeuticstimulation, such as cardiac pacing, cardioversion and defibrillationpulses, as well as a sensing module for sensing electrical signalsattendant to the depolarization and repolarization of heart 12. Housing8 may also enclose a memory for storing the sensed electrical signals.Housing 8 may also enclose a telemetry module for communication betweenIMD 16 and programmer 24.

IMD 16 senses electrical signals attendant to the depolarization andrepolarization of heart 12 via electrodes 4, 40, 42, 44, 46, 48, 50, 62,64 and 66. IMD 16 may sense such electrical signals via any bipolarcombination of electrodes 40, 42, 44, 46, 48, 50, 62, 64 and 66.Furthermore, any of the electrodes 40, 42, 44, 46, 48, 50, 62, 64 and 66may be used for unipolar sensing in combination with housing electrode4.

The illustrated numbers and configurations of leads 18, 20 and 22 andelectrodes are merely examples. Other configurations, i.e., number andposition of leads and electrodes, are possible. In some examples, system10 may include an additional lead or lead segment having one or moreelectrodes positioned at different locations in the cardiovascularsystem for sensing and/or delivering therapy to patient 14. For example,instead of or in addition to intercardiac leads 18, 20 and 22, system 10may include one or more epicardial or subcutaneous leads not positionedwithin the heart.

FIG. 3 is a block diagram illustrating an example IMD 16 that monitorsEGM signals and classifies the underlying cardiac rhythm as abnormalbefore providing a therapeutic response. In the illustrated example, IMD16 includes a processor 70, memory 72, signal generator 74, sensingmodule 76, telemetry module 78, episode classifier 80, and activitysensor 82. Memory 72 includes computer-readable instructions that, whenexecuted by processor 70, cause IMD 16 and processor 70 to performvarious functions attributed to IMD 16 and processor 70 herein. Memory72 may include any volatile, non-volatile, magnetic, optical, orelectrical media, such as a random access memory (RAM), read-only memory(ROM), non-volatile RAM (NVRAM), electrically-erasable programmable ROM(EEPROM), flash memory, or any other digital or analog media.

Processor 70 may include any one or more of a microprocessor, acontroller, a digital signal processor (DSP), an application specificintegrated circuit (ASIC), a field-programmable gate array (FPGA), orequivalent discrete or analog logic circuitry. In some examples,processor 70 may include multiple components, such as any combination ofone or more microprocessors, one or more controllers, one or more DSPs,one or more ASICs, or one or more FPGAs, as well as other discrete orintegrated logic circuitry. The functions attributed to processor 70herein may be embodied as software, firmware, hardware or anycombination thereof.

Generally, processor 70 controls signal generator 74 to deliverstimulation therapy to heart 12 of patient 14 according to a selectedone or more of therapy programs or parameters, which may be stored inmemory 72. As an example, processor 70 may control signal generator 74to deliver electrical pulses with the amplitudes, pulse widths,frequency, or electrode polarities specified by the selected one or moretherapy programs or parameters. In some examples, processor 70 maycontrol signal generator 74 to deliver therapeutic stimulationresponsive to a diagnosis or classification of an EGM signal by episodeclassifier 80.

Signal generator 74 is configured to generate and deliver electricalstimulation therapy to patient 14. As shown in FIG. 3, signal generator74 is electrically coupled to electrodes 4, 40, 42, 44, 46, 48, 50, 62,64 and 66, e.g., via conductors of the respective leads 18, 20, and 22and, in the case of housing electrode 4, within housing 8. For example,signal generator 74 may deliver pacing, defibrillation or cardioversionpulses to heart 12 via at least two of electrodes 4, 40, 42, 44, 46, 48,50, 62, 64 and 66. In some examples, signal generator 74 deliversstimulation in the form of signals other than pulses such as sine waves,square waves, or other substantially continuous time signals.

Signal generator 74 may include a switch module (not shown) andprocessor 70 may use the switch module to select, e.g., via adata/address bus, which of the available electrodes are used to deliverthe electrical stimulation. The switch module may include a switcharray, switch matrix, multiplexer, or any other type of switching devicesuitable to selectively couple stimulation energy to selectedelectrodes. Electrical sensing module 76 monitors electrical cardiacsignals from any combination of electrodes 4, 40, 42, 44, 46 48, 50, 62,64, and 66. Sensing module 76 may also include a switch module whichprocessor 70 controls to select which of the available electrodes areused to sense the heart activity, depending upon which electrodecombination is used in the current sensing configuration.

Sensing module 76 may include one or more detection channels, each ofwhich may comprise an amplifier. The detection channels may be used tosense the cardiac signals. Some detection channels may detect events,such as R-waves or P-waves, and provide indications of the occurrencesof such events to processor 70. One or more other detection channels mayprovide the signals to an analog-to-digital converter, for conversioninto a digital signal for processing or analysis by processor 70 orepisode classifier 80.

For example, sensing module 76 may comprise one or more narrow bandchannels, each of which may include a narrow band filteredsense-amplifier that compares the detected signal to a threshold. If thefiltered and amplified signal is greater than the threshold, the narrowband channel indicates that a certain electrical cardiac event, e.g.,depolarization, has occurred. Processor 70 then uses that detection inmeasuring frequencies of the sensed events.

In one example, at least one narrow band channel may include an R-waveor P-wave amplifier. In some examples, the R-wave and P-wave amplifiersmay take the form of an automatic gain controlled amplifier thatprovides an adjustable sensing threshold as a function of the measuredR-wave or P-wave amplitude. Examples of R-wave and P-wave amplifiers aredescribed in U.S. Pat. No. 5,117,824 to Keimel et al., which issued onJun. 2, 1992 and is entitled, “APPARATUS FOR MONITORING ELECTRICALPHYSIOLOGIC SIGNALS,” and is incorporated herein by reference in itsentirety.

In some examples, sensing module 76 includes a wide band channel whichmay comprise an amplifier with a relatively wider pass band than thenarrow band channels. Signals from the electrodes that are selected forcoupling to the wide-band amplifier may be converted to multi-bitdigital signals by an analog-to-digital converter (ADC) provided by, forexample, sensing module 76 or processor 70. Processor 70 and/or episodeclassifier 80 may analyze the digitized version of signals from the wideband channel. Processor 70 and/or episode classifier 80 may employdigital signal analysis techniques to characterize the digitized signalsfrom the wide band channel to, for example, detect and classify thepatient's heart rhythm.

Episode classifier 80 may detect and classify the patient's heart rhythmbased on the cardiac electrical signals sensed by sensing module 76employing any of the numerous signal processing methodologies known inthe art. For example, processor 70 may maintain escape interval countersthat may be reset upon sensing of R-waves by sensing module 76. Thevalue of the count present in the escape interval counters when reset bysensed depolarizations may be used by episode classifier 80 to measurethe durations of RR intervals, which are measurements that may be storedin memory 72. Episode classifier 80 may use the count in the intervalcounters to detect a tachyarrhythmia, such as ventricular fibrillationor ventricular tachycardia. A portion of memory 72 may be configured asa plurality of recirculating buffers, capable of holding series ofmeasured intervals, which may be analyzed by episode classifier 80 todetermine whether the patient's heart 12 is presently exhibiting atrialor ventricular tachyarrhythmia.

In some examples, episode classifier 80 may determine thattachyarrhythmia has occurred by identification of shortened RR intervallengths. Generally, episode classifier 80 detects tachycardia when theinterval length falls below 360 milliseconds (ms) and fibrillation whenthe interval length falls below 320 ms. These interval lengths aremerely examples, and a user may define the interval lengths as desired,which may then be stored within memory 72. This interval length may needto be detected for a certain number of consecutive cycles, for a certainpercentage of cycles within a running window, or a running average for acertain number of cardiac cycles, as examples.

In some examples, an arrhythmia detection method may include anysuitable tachyarrhythmia detection algorithms. In one example, episodeclassifier 80 may utilize all or a subset of the rule-based detectionmethods described in U.S. Pat. No. 5,545,186 to Olson et al., entitled,“PRIORITIZED RULE BASED METHOD AND APPARATUS FOR DIAGNOSIS AND TREATMENTOF ARRHYTHMIAS,” which issued on Aug. 13, 1996, or in U.S. Pat. No.5,755,736 to Gillberg et al., entitled, “PRIORITIZED RULE BASED METHODAND APPARATUS FOR DIAGNOSIS AND TREATMENT OF ARRHYTHMIAS,” which issuedon May 26, 1998. U.S. Pat. No. 5,545,186 to Olson et al. and U.S. Pat.No. 5,755,736 to Gillberg et al. are incorporated herein by reference intheir entireties. However, other arrhythmia detection methodologies mayalso be employed by episode classifier 80 in some examples. For example,EGM morphology may be considered in addition to or instead of intervallength for detecting tachyarrhythmias.

Generally, episode classifier 80 detects a treatable tachyarrhythmia,such as VF, based on the EGM, e.g., the RR intervals and/or morphologyof the EGM, and, in response, processor 70 selects a therapy to deliverto terminate the tachyarrhythmia, such as a defibrillation pulse of aspecified magnitude. The detection of the tachyarrhythmia may include anumber of phases or steps prior to delivery of the therapy, such asfirst phase, sometimes referred to as detection, in which a number ofconsecutive or proximate RR intervals satisfies a first number ofintervals to detect (NID) criterion, a second phase, sometimes referredto as confirmation, in which a number of consecutive or proximate RRintervals satisfies a second, more restrictive NID criterion.Tachyarrhythmia detection may also include confirmation based on EGMmorphology or other sensors subsequent to or during the second phase.Again, in some cases, episode classifier 80 may mistakenly classify thepatient's heart rhythm as a treatable tachyarrhythmia, e.g., as a resultof a noisy EGM or misdiagnosis of a supraventricular tachyarrhythmia asbeing a ventricular tachyarrhythmia.

In some examples, episode classifier 80 has a portion of the EGM signalsaved to memory 72 on an ongoing basis. When a tachyarrhythmia is notdetected, the EGM signal may be written over after a period of time. Inresponse to a tachyarrhythmia being detected, episode classifier 80 maydirect memory 72 to store on a long-term basis a time period of the EGMsignal leading up to the diagnosis of the tachyarrhythmia, along withthe specific diagnosis, e.g., ventricular tachycardia, ventricularfibrillation, or supraventricular tachycardia.

Although processor 70 and episode classifier 80 are illustrated asseparate modules in FIG. 3, processor 70 and episode classifier 80 maybe incorporated in a single processing unit. Episode classifier 80 maybe a component of or a module executed by processor 70.

Activity sensor 82 may be optionally included in some examples of IMD16. Activity sensor 82 may include one or more accelerometers. Activitysensor 82 may additionally or alternatively include other sensor such asa heart sounds sensor, a pressure sensor, or an O₂ saturation sensor.Activity sensor 82 may detect respiration via one or more electrodes.Information obtained from activity sensor 82 may be used to determineactivity level, posture, blood oxygen level or respiratory rate, forexample, leading up to, or at the time of the abnormal heart rhythm. Insome examples, this information may be used by IMD 16 to aid in theclassification of an abnormal heart rhythm.

Activity sensor 82 may, for example, take the form of one or moreaccelerometers, or any other sensor known in the art for detectingactivity, e.g., body movements or footfalls, or posture. In someexamples, activity sensor 82 may comprise a three-axis accelerometer.Processor 70 may determine an activity level count at regular intervalsbased on the signal(s) from activity sensor 82. In some examples,processor 70 may determine a running average activity count based on theinformation provided by activity sensor 82. For example, the activitycount may be calculated over a 1 second interval and the processor 70may update the activity level count at a 1 second interval. A method ofdetermining activity count from an accelerometer sensor is described inU.S. Pat. No. 6,449,508, to Sheldon et al, entitled, “ACCELEROMETERCOUNT CALCULATION FOR ACTIVITY SIGNAL FOR AN IMPLANTABLE MEDICALDEVICE,” issued Sep. 10, 2002, and incorporated herein by reference inits entirety.

Activity sensor 82 may be located outside of the housing 8 of IMD 16.Activity sensor 82 may be located on a lead that is coupled to IMD 16 ormay be implemented in a remote sensor that wirelessly communicates withIMD 16 via telemetry module 78. In any case, activity sensor 82 iselectrically or wirelessly coupled to circuitry contained within housing8 of IMD 16.

Telemetry module 78 includes any suitable hardware, firmware, softwareor any combination thereof for communicating with another device, suchas programmer 24 (FIG. 1). Under the control of processor 70, telemetrymodule 78 may receive downlink telemetry from and send uplink telemetryto programmer 24 with the aid of an antenna, which may be internaland/or external. In some examples, processor 70 may transmit cardiacsignals, e.g., ECG or EGM signals, produced by sensing module 76 and/orsignals selected by episode classifier 80 to programmer 24. Processor 70may also generate and store marker codes indicative of different cardiacor other physiological events detected by sensing module 76 or episodeclassifier 80, and transmit the marker codes to programmer 24. Anexample IMD with marker-channel capability is described in U.S. Pat. No.4,374,382 to Markowitz, entitled, “MARKER CHANNEL TELEMETRY SYSTEM FOR AMEDICAL DEVICE,” which issued on Feb. 15, 1983 and is incorporatedherein by reference in its entirety. Information which processor 70 maytransmit to programmer 24 via telemetry module 78 may also include anindication of a change in disease state of the heart, an indication of achange in heart response to the therapy provided or an indication thatthe heart continues to response in the same (or similar) manner to thetherapy provided, the indications based on heart sounds and/or EGMsignals. Such information may be included as part of a marker channelwith an EGM.

FIG. 4 is a block diagram illustrating an example system that includesan external device, such as a server 314, and one or more computingdevices 320A-320N that are coupled to the IMD 16 and programmer 24 shownin FIG. 1 via a network 312. Network 312 may be generally used totransmit diagnostic information (e.g., a diagnosis made by IMD 16resulting in a shock) from an IMD 16 to a remote external computingdevice. In some examples, EGM signals may be transmitted to an externaldevice for processing.

In some examples, the information transmitted by IMD 16 may allow aclinician or other healthcare professional to monitor patient 14remotely. In some examples, IMD 16 may use a telemetry module tocommunicate with programmer 24 via a first wireless connection, and tocommunicate with access point 310 via a second wireless connection,e.g., at different times. In the example of FIG. 4, access point 310,programmer 24, server 314 and computing devices 320A-320N areinterconnected, and able to communicate with each other through network312. In some cases, one or more of access point 310, programmer 24,server 314 and computing devices 320A-320N may be coupled to network 312via one or more wireless connections. IMD 16, programmer 24, server 314,and computing devices 320A-320N may each comprise one or moreprocessors, such as one or more microprocessors, DSPs, ASICs, FPGAs,programmable logic circuitry, or the like, that may perform variousfunctions and operations, such as those described herein.

Access point 310 may comprise a device that connects to network 312 viaany of a variety of connections, such as telephone dial-up, digitalsubscriber line (DSL), or cable modem connections. In other examples,access point 310 may be coupled to network 312 through different formsof connections, including wired or wireless connections. In someexamples, access point 310 may be co-located with patient 14 and maycomprise one or more programming units and/or computing devices (e.g.,one or more monitoring units) that may perform various functions andoperations described herein. For example, access point 310 may include ahome-monitoring unit that is co-located with patient 14 and that maymonitor the activity of IMD 16. In some examples, server 314 orcomputing devices 320 may control or perform any of the variousfunctions or operations described herein, e.g., determine, based on EGMsignal data, an episode classification using episode classifier 318 todetermine if IMD 16 properly classified various cardiac episodes.

In some cases, server 314 may be configured to provide a secure storagesite for archival of diagnostic information (e.g., occurrence of adiagnosis and shock by IMD 16 and attendant circumstances such as theEGM signal leading up to the diagnosis) that has been collected andgenerated from IMD 16 and/or programmer 24. Network 312 may comprise alocal area network, wide area network, or global network, such as theInternet. In some cases, programmer 24 or server 314 may assemble EGMsignal and diagnosis information in web pages or other documents forviewing by trained professionals, such as clinicians, via viewingterminals associated with computing devices 320. The system of FIG. 4may be implemented, in some aspects, with general network technology andfunctionality similar to that provide by the Medtronic CareLink® Networkdeveloped by Medtronic, Inc., of Minneapolis, Minn.

In the example of FIG. 4, external server 314 may receive EGM signaldata from IMD 16 via network 312. Based on the EGM signal data received,processor(s) 316 may preform one or more of the functions describedherein with respect to processor 86 of programmer 24. Computing devices320A-320N may also include a processor that performs one or more of thefunctions described herein with respect to processor 86 of programmer24. For example, episode classification may be carried out by any of theprogrammer 24, external server 314 or computing device 320.

FIG. 5 is a block diagram illustrating an example programmer 24 ofFIG. 1. As illustrated in FIG. 5 programmer 24 may include a processor86, a memory 92, a user interface 84, a telemetry module 90, an episodeclassifier 318, and a power source 88. Processor 86 stores and retrievesinformation and instructions to and from memory 92. Programmer 24 may beconfigured for use as a clinician programmer of a patient programmer.Processor 86 may include a microprocessor, a microcontroller, a DSP, anASIC, an FPGA, or other equivalent discrete or integrated logiccircuitry. Accordingly, processor 86 may include any suitable structure,whether in hardware, software, firmware or any combination thereof, toperform the functions ascribed herein to processor 86.

A user, such as a clinician, may interact with programmer 24 throughuser interface 84. Accordingly, in some examples programmer 24 maycomprise a patient programmer or a clinician programmer. The techniquesof this disclosure are directed post-processing of EGM signals collectedby IMD 16 and used by IMD 16 to diagnosis treatable arrhythmias. Thepost-processing is used to determine whether IMD 16 correctly diagnosedthe detected arrhythmia. Therefore, many of the functions ascribed toprogrammer 24, and in particular processor 86, may be performed by anyexternal device, e.g., external device 314, or computing device, e.g.,computing device 320. When programmer 24 is configured as a patientprogrammer, in some examples, the patient programmer is not necessarilyconfigured to perform the post-processing or provide informationregarding the accuracy of diagnosis to the patient. In some examples,when programmer 24 is configured as a clinician programmer, processor 86may be configured to perform the post-processing using episodeclassifier 318 and episode classification rules 94

Although processor 86 and episode classifier 318 are illustrated asseparate modules in FIG. 5, processor 86 and episode classifier may beincorporated in a single processing unit. Episode classifier 318 may bea component of or a module executed by processor 86.

User interface 84 includes a display (not shown), such as a LCD or LEDdisplay or other type of screen, to present information related to thetherapy, such as information related to current stimulation parametersand electrode combinations and in some examples, when configured torender graphics objects, an image of a volume of activation and ananatomical feature including a therapy target of patient 14. Inaddition, user interface 84 may include an input mechanism to receiveinput from the user. The input mechanisms may include, for example,buttons, a keypad (e.g., an alphanumeric keypad), a peripheral pointingdevice, or another input mechanism that allows the user to navigatethrough user interfaces presented by processor 86 of programmer 24 andprovide input. The input may include, for example, changes to current orproposed stimulation parameters or selection of electrode combinations.

If programmer 24 includes buttons and a keypad, the buttons may bededicated to performing a certain function, e.g., a power button, or thebuttons and the keypad may be soft keys that change in functiondepending upon the section of the user interface currently viewed by theuser. Alternatively, the display (not shown) of programmer 24 may be atouch screen that allows the user to provide input directly to the userinterface shown on the display. The user may use a stylus or a finger toprovide input to the display. In other examples, user interface 84 alsoincludes audio circuitry for providing audible instructions or sounds topatient 14 and/or receiving voice commands from patient 14, which may beuseful if patient 14 has limited motor functions. Patient 14, aclinician or another user may also interact with programmer 24 tomanually select therapy programs, generate new therapy programs, modifytherapy programs through individual or global adjustments, and transmitthe new programs to IMD 16. In some examples, at least some of thecontrol of therapy delivery by IMD 16 may be implemented by processor 86of programmer 24. A clinician or other user may interact with programmer24 to select a stimulation electrode combination or modify a set ofstimulation parameters.

In some examples, processor 86 may control IMD 16 via telemetry module90 to modify program parameters controlling a stimulator within IMD 16to deliver cardiac stimulating pulses to heart 12 via selected electrodecombinations. In particular, processor 86 transmits programming signalsto IMD 16 via telemetry module 90. Processor 86 receives a segment ofEGM signal data containing representing a cardiac episode resulting in adiagnosis of an arrhythmia followed by electrical stimulation based onthe diagnosis. The episode may be received from telemetry module 90 orfrom memory 92.

Episode classifier 318 may apply episode classification rules stored inepisode classification rules 94 to the cardiac episode. The episodesreceived from IMD 16 may be stored in stored episodes 96 until retrievedby episode classifier 318 for classification.

Telemetry module 90 receives EGM signal data from IMD 16. The EGM signaldata may be transmitted to telemetry module 90 when IMD 16 diagnoses anarrhythmia and responds with electrical stimulation. In some examples,portions of EGM signal data are stored in memory 72 of IMD 16 until apredetermined event occurs. After the event has occurred the data istransmitted via telemetry module 78 of IMD 16 to telemetry module 90 ofprogrammer 24. For example, periodically, e.g., every three months, oropportunistically, e.g., when IMD 16 is in communication with programmer24 or access point 310, IMD 16 may transmit EGM signal data selected byepisode classifier 80 and stored in memory 72. In some examplestelemetry module 90 sends program information to IMD 16 to control theoperation of the IMD.

In some examples, shown in FIG. 5, memory 92 includes episodeclassification rules 94, stored episodes 96 and stored programs 98 inseparate memories within memory 92 or separate areas within memory 92.Memory 92 may also include instructions for operating user interface 84,telemetry module 90, and for managing power source 88. Memory 92 mayinclude any volatile or nonvolatile memory such as RAM, ROM, EEPROM orflash memory. Memory 92 may also include a removable memory portion thatmay be used to provide memory updates or increases in memory capacities.A removable memory may also allow sensitive patient data to be removedbefore programmer 24 is used by a different patient.

Stored episodes 96 stores EGM signal data received from IMD 16 viatelemetry module 90. In some examples, the EGM signal data is separatedinto episodes, and each episode is saved along with a diagnosis made byIMD 16 based on the EGM signal data in the episode. IMD 16 may transmitEGM signal data at predetermined time intervals, for example every threemonths. The EGM signals are received by telemetry module 90 and storedin stored episodes 96 until a classification algorithm is initiated. Insome examples, episode classifier 318, retrieves episodes stored instored episodes 96 one at a time and confirms or rejects the diagnosisof IMD 16 using episode classification rules stored in episodeclassification rule 94. In some examples, a user may select one or moreepisodes stored in stored episodes 96 for post-processingclassification.

Episode classification rules 94 store a classification algorithm or aset of classification rules used to confirm or reject the diagnosis ofIMD 16. In some examples, the classification algorithm is as shown inFIGS. 6A-6C or FIG. 7, and described in more detail below. In someexamples, the episode classification rules classify each episode assupraventricular tachycardia (SVT), ventricular tachycardia orventricular fibrillation (VT/VF) or unknown. The classifications may becompared to the diagnosis generated by IMD 16 prior to delivery therapy,for example.

FIGS. 6A-6C are parts of a flow chart illustrating an exampleclassification algorithm consistent with the present disclosure. Theexample classification algorithm of FIGS. 6A-6C is generally applicableto cardiac episodes where IMD 16 stored EGM signals for both the NF andFF channels. FIG. 6A illustrates a classification algorithm using EGMsignal data from a near-field (NF) EGM channel. FIG. 6B illustrates aclassification algorithm using EGM signal data from a far-field (FF) EGMchannel. FIG. 6C illustrates a classification algorithm for determininga final classification based on the classification of the NF EGM dataand the FF EGM data. The NF and FF portions of the algorithm illustratedin FIGS. 6A and 6B may be applied in any order. The resultingclassification is stored, and the classification from both FIG. 6A andFIG. 6B are used in FIG. 6C.

Turning to FIG. 6A, episode classifier 318 selects a detected NF EGMChannel episode (100) from stored episodes 94. Episode classifier 318determines whether the EGM data received from IMD 16 includesspontaneous and regular sensing (102), i.e., not induced. In someexamples, a method of determining whether data previously utilized by adevice to identify a cardiac episode correspond to regular sensing ofevents includes a determination as to whether over-sensing orunder-sensing has occurred. The determination of over-sensing orunder-sensing may be based on a determination of whether one of apredetermined number of over-sensing or under-sensing criteria has beenmet. An example of an over-sensing criterion includes the existence ofsimultaneous atrial and ventricular events, except in instances wherethe ventricular event is ventricular Pace for ATP. An example of anunder-sensing criterion includes determining whether at least one sensedAA interval associated with predetermined beats, such as the NIDventricular beats prior to detection of the event and the atrialinterval immediately subsequent to the detection of the event is greaterthan a predetermined interval, such as 2500 ms, for example. Anotherexample of under-sensing criteria include determining whether the atrialchannel includes less than a predetermined number of events prior todetection. Other examples of both over-sensing and under-sensingcriteria are taught in U.S. Pat. No. 7,894,883 to Gunderson et al.,incorporated herein by reference in its entirety. In the event that anepisode is found to be either not spontaneous or not include regularsensing, the episode is classified as unknown or ventricularover-sensing (VOS) for the NF EGM channel (104). The episode may becategorized as VOS when over-sensing is found.

In response to a determination that the episode received from IMD 16 isspontaneous and includes regular sensing, episode classifier 318 and/orprocessor 86 determine the A/V (atrial events to ventricular events)ratio during the beats preceding detection (106) or diagnosis. The ratioof atrial sensed events to ventricular sensed events is determined for apredetermined window of sensed events occurring prior to detection ordiagnosis by IMD 16 of the cardiac episode. In some examples, thepredetermined window used for calculating the A/V ratio may be definedby the last 12 ventricular sensed events occurring just prior to thepoint of diagnosis of the cardiac episode. It is understood that thewindow may be defined by any predetermined number of ventricular sensedevents prior to detection. The number of atrial sensed events occurringwithin the window is then determined and used to determine the A/Vratio. If the number of atrial sensed events occurring during the windowis equal to the number of ventricular sensed events, a determination ismade as to whether the atrial sensed events are evenly distributed withthe ventricular sensed events, that is, whether there is a 1:1distribution prior to detection (108). If there is one atrial sensedevent located between each adjacent pairs of all of the ventricularsensed events, the event is identified as being a supraventriculartachycardia (SVT) episode (126) for the NF EGM Channel. The rationalebehind this classification is that a ventricular arrhythmia would have ashorter ventricular cycle length than the atrial cycle length at somepoint in the episode.

If the atrial sensed events are determined to be not evenly distributedwith the ventricular sensed events in a one to one distribution (108)the classification of the episode is further evaluated. Episodeclassifier 318 may determine which chamber is leading (110). Episodeclassifier 318 determines whether the heart rhythm was initiated byconduction in the ventricles or in the atria. In some examples, an onsetthreshold is determined. Once the onset threshold has been determined, aspatial reference point is identified and used to form a window fordetermining whether conduction of the heart rhythm was imitated by oneof the atrial and the ventricular chambers. For example, an RR intervalassociated with pre-NID or sinus rhythm, i.e., greater than the onsetthreshold, occurring prior to an interval correspond to when the episodewas detected, may be used as the spatial reference point for forming thewindow. In some examples, the spatial reference point may be identifiedby determining by working backwards from the detection until apredetermined number of sequential adjacent intervals occurring prior tothe interval associated with the detection is greater than the onsetthreshold. Other examples of determining a spatial reference point andwindow for determining which chamber is leading may be found in U.S.Pat. No. 7,894,883 to Gunderson et al., incorporated herein by referencein its entirety.

Determining which chamber is leading (110) may include identification ofa spatial reference point, as wells as a predetermined number ofintervals centered around the determined spatial reference point. Thenumber of sensed atrial events occurring between each interval withinthe window is determined. If there is one atrial sensed event betweeneach of the adjacent ventricular sensed events in the window, the atriumis determined to be initiating conduction. In response to adetermination that the atrium is leading, episode classifier 318classifies the episode as SVT for the NF EGM channel (126). If there isone atrial sensed event between adjacent ventricular sensed events forall except one of the ventricular sensed event intervals, and no atrialsensed events between one set of adjacent ventricular sensed events,then the ventricles are determined to be initiating conduction. If theventricles are found to be leading, episode classifier 318 classifiesthe episode as a ventricular tachycardia/ventricular fibrillation(VT/VF) episode (116). If there is one atrial sensed event between eachof the adjacent ventricular sensed events for less than the number ofintervals minus one, and no atrial sensed event between adjacentventricular sensed events for more than one of the intervals, thenneither the atrium nor the ventricles are determined to be drivingconduction. If no determination is made, then processor 86 continues toattempt to classify the episode based on whether the effects the effectsof anti-tachycardia pacing (ATP) are indicative of a supraventriculartachycardia episode.

Episode classifier 318 may determine whether the cycle length betweenatrial events, that is, the interval between P-waves is the same duringthe episode being classified as during an antitachycardia pacing regimenpreviously applied to the patient (112). In some examples, adetermination about the effects of anti-tachycardia pacing is made usinga method of dynamic discrimination described in commonly assigned U.S.Pat. No. 7,317,942, issued Jan. 8, 2008, entitled “DYNAMICDISCRIMINATION UTILIZING ANTI-TACHY PACING THERAPY IN AN IMPLANTABLEMEDICAL DEVICE” to Brown et al., and incorporated herein by reference inits entirety. For example, instances where IMD 16 delivered anantitachycardia pacing regimen may be identified by IMD 16 or programmer24 and the corresponding EGM signal data may be stored in memory 92. TheEGM signal associated with the therapy may be reviewed to determine amean cycle length between atrial events occurring prior to the deliveryof the antitachycardia pacing therapy and comparing the determinedatrial cycle length during the delivery of the pacing therapy to a meancycle atrial cycle length during the episode. If the difference betweenthe mean atrial cycle and the atrial cycle length during the delivery ofthe pacing therapy is less than or equal to a predetermined atrial cyclelength threshold, such as 30 ms for example, the episode is classifiedas being a SVT on the NF channel (126). If the difference between themean atrial cycle length for the episode and the atrial cycle lengthduring the delivery of the pacing therapy is greater than thepredetermined threshold then the processor continues with theclassification algorithm for the NF EGM channel.

If the PP interval (or atrial cycle) of the episode is not the same asthe atrial cycle length during ATP, then the morphology of a maximuminterval within the episode being classified and the minimum intervalwithin the episode being classified are compared. Episode classifier 318may determine, based on episode classification rules 94, whether theintervals have the same morphology despite having different RR intervallengths (122). In some examples, the comparison occurs if the differencebetween the maximum interval and the minimum interval is greater than apredetermined threshold. A determination is then made as to whether thecorrelation between the morphologies of the two intervals is greaterthan a predetermined correlation threshold, such as 0.94, for example.

If the correlation between the two intervals is greater than thepredetermined correlation threshold, then the detected episode isclassified as being SVT for the NF EGM channel (126). If the correlationis below the predetermined correlation threshold, or the differencebetween the maximum and minimum intervals is below the predeterminedthreshold for difference between the two intervals, then the morphologyof the intervals within the episode are compared to a NF VT template.Episode classifier 318 determines how many of the intervals have amorphology that matches the NF VT template (124). The NF VT template maybe one of more NF VT templates stored within memory 92. In some examplesthe VT template may have been stored during the classification of aprevious episode from the same patient. Episode classifier 318 compareseach interval within the episode with the NF VT template and determineswhether each interval correlates to the NF VT template based on apredetermined correlation threshold. If the number of intervals havingmorphologies that correlate to the NF VT template is above apredetermined matching percentage threshold, then the morphology for theepisode is determined to match the template. In response, the episode isclassified at VT/VF for the NF EGM channel (116). If the number ofintervals having morphologies that correlate to the NF VT template isbelow the predetermined matching percentage threshold, then the episodeis classified as unknown for the NF EGM channel (105). The matchingpercentage threshold may be programmable by a default, or may beadjusted by the clinician or other user. In some examples the thresholdmay be adjusted on a patient-by-patient or clinic-by clinic basis. Insome examples, the matching percentage threshold may be betweenapproximately 70% and 85%. In some examples, the matching percentagethreshold may be approximately 80%.

If that the A/V ratio during the beats preceding detection (106) is suchthat the number of atrial sensed events is below the number ofventricular sensed events within a window preceding detection, then aninterval may be stored as a NF VT template (114). The episode isclassified as VT/VF for the NF EGM channel (116). In some examples, thedifference between the number of atrial sensed events and the number ofventricular sensed events must be greater than 1.

In response to an A/V ratio during the beats preceding a detection (106)where the number of atrial sensed events is greater than the number ofventricular sensed events, episode classifier 318 determines whether thedata used by IMD 16 during the initial classification of the episode asa detected episode includes RR intervals that are regular, and whetherthe PR intervals are stable (118). In an example to illustrate howepisode classifier 318 determines whether the RR intervals are regularand whether the PR intervals are stable (118), an episode beingprocessed includes a number of intervals to detection (NID) of 16intervals. That is, during the initial detection process IMD 16 detectedthe occurrence of a cardiac episode once the detection criteria had beenmet, i.e., once 16 intervals having a rate than the threshold rate weredetected. In some examples, IMD 16 continuously stores a buffercontaining a number of the most recent intervals of the EGM signal. Thismay allow IMD 16 to store an EGM signal including all 16 intervalsresulting in detection to memory 72 after detection. In order todetermine whether the data used by IMD 16 during the initialclassification of the episode as a detected episode includes intervalsthat are regular, a modesom of the 16 RR intervals resulting indetection is generated by determining whether the number of intervals inthe two highest modes (i.e., most frequent bins) is greater than apredetermined percentage of the number of RR intervals. The percentagemay be 67%, for example. If the number of intervals in the two highestmodes is above the percentage threshold, then the data is considered toinclude regular RR intervals.

Episode classifier 318 also determines whether the AV intervalsassociated with the initial identification of the episode as a cardiacepisode are stable. For example, in order to determine whether the AVintervals associate with the initial identification of the episode as acardiac episode are stable, PR intervals, i.e., the time between anatrial sensed event and a subsequent ventricular sensed event, aredetermined for each of the 16 intervals. In some examples, in order toreduce the effect of outliers, once the PR intervals are determined foreach of the intervals associated with the initial identification of theepisode as a cardiac episode, a predetermined number of maximum PRintervals and minimum PR intervals are removed. For example, one sixthof the maximum PR intervals and one sixth of the minimum PR intervalsmay be removed. A PR range is then determined as the difference betweenthe minimum PR interval and the maximum PR interval. Episode classifier318 then determines whether the range of PR intervals satisfies a PRstable criterion. For example, a determination may be made as to whetherthe range of the remaining PR intervals is less than 20 ms. In responseto a determination that the RR intervals are regular and the PRintervals are stable, the episode is classified as SVT for the NF EGMchannel (126). If episode does not include both regular RR intervals andstable PR intervals, then episode classifier 318 determiners how manyatrial events are unassociated with a ventricular event and how manyatrial events are associated with a ventricular event (120). The episodeclassifier 318 may look for approximately consistent AV intervals foratrial events associated with a ventricular event. If the number ofatrial events part of an AV interval is above a predetermine threshold,then the cardiac episode is classified as SVT for the NF EGM channel(126) by episode classifier 318.

If the number of unassociated atrial events is below a predeterminedthreshold, then, the data associated with the episode is examined todetermine whether RR intervals with different lengths have approximatelythe same morphology (122). In some examples, the maximum and minimumintervals in the episode are compared and, if the difference is greaterthan a predetermined threshold, such as 100 ms for example, then themorphology of the maximum interval is compared to the morphology of theminimum interval. If the morphologies are found to correlate, theepisode is classified as SVT for the NF EGM channel (126). As describedabove, if the maximum and minimum intervals are not found to correlate,then the morphologies of each of the intervals associated with detectionof a cardiac episode are compared with a template or templates stored inmemory 82, the template or templates being NF VT templates. Episodeclassifier 318 determines for each of the intervals whether thecorrelation of the morphology between the interval and the template isgreater than a predetermined correlation threshold. If then number ofintervals having morphologies that correlate to the store template isgreater than a predetermined matching percentage threshold, than theepisodes is classified as being VT/VF for the NF channel. If the numberof intervals that match is below the matching percentage threshold, thenthe episode is classified as unknown for the NF EGM channel (105).

FIG. 6B illustrates an example algorithm for classifying EGM datareceived from the FF channel of IMD 16. Episode classifier 318 selects adetected NF EGM Channel episode (128) from stored episodes 94. Processor86 and/or episode classifier 318 determines whether the EGM datareceived from IMD 16 includes spontaneous and regular sensing (130),i.e., not induced. In some examples, a method of determining whetherdata previously utilized by a device to identify a cardiac episodecorrespond to regular sensing of events includes a determination as towhether over-sensing or under-sensing has occurred. The determination ofover-sensing or under-sensing may be based on a determination of whetherone of a predetermined number of over-sensing or under-sensing criteriahas been met. An example of an over-sensing criterion includes theexistence of simultaneous atrial and ventricular events, except ininstances where the ventricular event is ventricular Pace for ATP. Anexample of an under-sensing criterion includes determining whether atleast one sensed AA interval associated with predetermined beats, suchas the NID ventricular beats prior to detection of the episode and theatrial interval immediately subsequent to the detection of the episodeis greater than a predetermined interval, such as 2500 ms, for example.Another example of under-sensing criteria include determining whetherthe atrial channel includes less than a predetermined number of eventsprior to detection. Other examples of over-sensing or under-sensingcriteria are taught in U.S. Pat. No. 7,894,883 to Gunderson et al.,incorporated herein by reference in its entirety. If an episode is foundto be either not spontaneous or not include regular sensing, the episodeis classified as unknown or VOS for the FF EGM channel (132). Theepisode may be classified as VOS when over-sensing is found.

In response to a determination that the episode received from IMD 16 isspontaneous and includes regular sensing, episode classifier 318determines the A/V ratio during the beats preceding detection (134). Theratio of atrial sensed events to ventricular sensed events is determinedfor a predetermined window of sensed events occurring prior to detectionby IMD 16 of the cardiac event. In some examples, the predeterminedwindow used for calculating the A/V ratio may be defined by the last 12ventricular sensed events occurring just prior to the point of detectionof the cardiac episode. It is understood that the window may be definedby any predetermined number of ventricular sensed events prior todetection. The number of atrial sensed events occurring within thewindow is then determined and used to determine the A/V ratio. If thenumber of atrial sensed events occurring during the window is equal tothe number of ventricular sensed events, a determination is made as towhether the atrial sensed events are evenly distributed with theventricular sensed events, that is, whether there is a 1:1 distributionprior to detection (136). If there is one atrial sensed event locatedbetween each adjacent pairs of all of the ventricular sensed events, theevent is identified as being a supraventricular tachycardia (SVT)episode (158) for the FF EGM Channel. The rationale behind thisclassification is that a ventricular arrhythmia would have a shorterventricular cycle length than the atrial cycle length at some point inthe episode.

If the atrial sensed events are determined to be not evenly distributedwith the ventricular sensed events in a one to one distribution (136),the classification of the episode is further evaluated. Episodeclassifier 318 may determine which chamber is leading (138). Episodeclassifier 318 determines whether the heart rhythm was initiated byconduction in the ventricle or in the atria. In some examples, an onsetthreshold is determined. Once the onset threshold has been determined, aspatial reference point is identified and used to form a window fordetermining whether conduction of the heart rhythm was imitated by oneof the atrial and the ventricular chambers. For example, an RR intervalassociated with pre-NID or sinus rhythm, i.e., greater than the onsetthreshold, occurring prior to an interval correspond to when the episodewas detected, may be used as the spatial reference point for forming thewindow. In some examples, the spatial reference point may be identifiedby determining by working backwards from the detection until apredetermined number of sequential adjacent intervals occurring prior tothe interval associated with the detection is greater than the onsetthreshold. Other examples of determining a spatial reference point andwindow for determining which chamber is leading may be found in U.S.Pat. No. 7,894,883 to Gunderson et al., incorporated herein by referencein its entirety.

Determining which chamber is leading (138) may include identification ofa spatial reference point, as wells as a predetermined number ofintervals centered around the determined spatial reference point. Thenumber of sensed atrial events occurring between each interval withinthe window is determined. If there is one atrial sensed event betweeneach of the adjacent ventricular sensed vents in the window, the atriumis determined to be initiating conduction. In response to adetermination that the atrium is leading, episode classifier 318classifies the episode as SVT for the FF EGM channel (158). If there isone atrial sensed event between adjacent ventricular sensed events forall except one of the ventricular sensed event intervals, and no atrialsensed events between one set of adjacent ventricular sensed events,then the ventricles are determined to be initiating conduction. If theventricles are found to be leading, episode classifier 318 classifiesthe episode as a ventricular tachycardia/ventricular fibrillation(VT/VF) episode (156). If there is one atrial sensed event between eachof the adjacent ventricular sensed events for less than the number ofintervals minus one, and no atrial sensed event between adjacentventricular sensed events for more than one of the intervals, thenneither the atrium nor the ventricles are determined to be drivingconduction. If no determination is made, then processor 86 continues toattempt to classify the episode based on whether the effects the effectsof anti-tachycardia pacing (ATP) are indicative of a supraventriculartachycardia episode.

Episode classifier 318 may determine whether the cycle length betweenatrial events, that is, the interval between P-waves is the same duringthe episode being classified as during an antitachycardia pacing regimenpreviously applied to the patient (140). In some examples, adetermination about the effects of anti-tachycardia pacing is made usinga method of dynamic discrimination described in commonly assigned U.S.Pat. No. 7,317,942, issued Jan. 8, 2008, entitled “DYNAMICDISCRIMINATION UTILIZING ANTI-TACHY PACING THERAPY IN AN IMPLANTABLEMEDICAL DEVICE” to Brown et al., and incorporated herein by reference inits entirety. For example, instances where IMD 16 delivered anantitachycardia pacing regimen may be identified by IMD 16 or programmer24 and the corresponding EGM signal data may be stored in memory 92. TheEGM signal associated with the therapy may be reviewed to determine amean cycle length between atrial events occurring prior to the deliveryof the antitachycardia pacing therapy and comparing the determinedatrial cycle length during the delivery of the pacing therapy to a meancycle atrial cycle length during the episode. If the difference betweenthe mean atrial cycle and the atrial cycle length during the delivery ofthe pacing therapy is less than or equal to a predetermined atrial cyclelength threshold, such as 30 ms for example, the episode is classifiedas being a SVT on the FF channel (158). If the difference between themean atrial cycle length for the episode and the atrial cycle lengthduring the delivery of the pacing therapy is greater than thepredetermined threshold then the processor continues with theclassification algorithm for the FF EGM channel.

If the PP interval (or atrial cycle) of the episode is not the same asthe atrial cycle length during ATP, then the morphology of a maximuminterval within the episode being classified and the minimum intervalwithin the episode being classified are compared. Processor 86 determinewhether the intervals have the same morphology despite having differentRR interval lengths (150). In some examples, the comparison occurs ifthe difference between the maximum interval and the minimum interval isgreater than a predetermined threshold. A determination is then made asto whether the correlation between the morphologies of the two intervalsis greater than a predetermined correlation threshold, such as 0.94, forexample.

If the correlation between the two intervals is greater than thepredetermined correlation threshold, then the detected episode isclassified as being SVT for the FF EGM channel (158). If the correlationis below the predetermined correlation threshold, or the differencebetween the maximum and minimum intervals is below the predeterminedthreshold for difference between the two intervals, then the morphologyof the intervals within the episode are compared to a FF VT template.Episode classifier 318 determines how many of the intervals have amorphology that matches the FF VT template (152). The FF VT template maybe one of more FF VT templates stored within memory 92. In some examplesthe VT template may have been stored during the classification of aprevious episode from the same patient. Episode classifier 318 compareseach interval within the episode with the FF VT template and determineswhether each interval correlates to the FF VT template based on apredetermined correlation threshold. If the number of intervals havingmorphologies that correlate to the FF VT template is above apredetermined matching percentage threshold, then the morphology for theepisode is determined to match the template. In response, the episode isclassified at VT/VF for the FF EGM channel (156). If the number ofintervals having morphologies that correlate to the FF VT template isbelow the predetermined matching percentage threshold, then the episodeis classified as unknown for the FF EGM channel (133). The matchingpercentage threshold may be programmable by a default, or may beadjusted by the clinician or other user. In some examples the thresholdmay be adjusted on a patient-by-patient or clinic-by clinic basis. Insome examples, the matching percentage threshold may be approximatelybetween 70% and 85%. In some examples, the matching percentage may beapproximately 80%.

If the A/V ratio during the beats preceding detection (134) is such thatthe number of atrial sensed events is below the number of ventricularsensed events within a window preceding detection, then an interval maybe stored as a FF VT template (142). The episode is classified as VT/VFfor the FF EGM channel (156). In some examples, the difference betweenthe number of atrial sensed events and the number of ventricular sensedevents must be greater than 1.

In response to an A/V ratio during the beats preceding a detection (134)where the number of atrial sensed events is greater than the number ofventricular sensed events, episode classifier 318 determines whether thedata used by IMD 16 during the initial classification of the episode asa detected episode includes RR intervals that are regular, and whetherthe PR intervals are stable (146). In an example to illustrate howepisode classifier 318 determines whether the RR intervals are regularand whether the PR intervals are stable (146), an episode beingprocessed includes a number of intervals to detection (NID) of 16intervals. That is, during the initial detection process IMD 16 detectedthe occurrence of a cardiac episode once the detection criteria had beenmet, i.e., once 16 intervals having a rate than the threshold rate weredetected. In some examples, IMD 16 continuously stores a buffercontaining a number of the most recent intervals of the EGM signal. Thismay allow IMD 16 to store an EGM signal including all 16 intervalsresulting in detection to memory 72 after detection. In order todetermine whether the data used by IMD 16 during the initialclassification of the episode a detected episode includes intervals thatare regular, a modesom of the 16 RR intervals resulting in detection isgenerated by determining whether the number of intervals in the twohighest modes (i.e., most frequent bins) is greater than a predeterminedpercentage of the number of RR intervals. The percentage may be 67%, forexample. If the number of intervals in the two highest modes is abovethe percentage threshold, then the data is considered to include regularRR intervals.

Episode classifier 318 also determines whether the AV intervalsassociated with the initial identification of the episode as a cardiacepisode are stable. For example, in order to determine whether the AVintervals associate with the initial identification of the episode as acardiac episode are stable, PR intervals, i.e., the time between anatrial sensed event and a subsequent ventricular sensed event, aredetermined for each of the 16 intervals. In some examples, in order toreduce the effect of outliers, once the PR intervals are determined foreach of the intervals associated with the initial identification of theepisode as a cardiac episode, a predetermined number of maximum PRintervals and minimum PR intervals are removed. For example, one sixthof the maximum PR intervals and one sixth of the minimum PR intervalsmay be removed. A PR range is then determined as the difference betweenthe minimum PR interval and the maximum PR interval. Episode classifier318 then determines whether the range of PR intervals satisfies a PRstable criterion. For example, a determination may be made as to whetherthe range of the remaining PR intervals is less than 20 ms. In responseto a determination that the RR intervals are regular and the PRintervals are stable, the episode is classified as SVT for the FF EGMchannel (158). If episode does not include both regular RR intervals andstable PR intervals, then episode classifier 318 determiners how manyatrial events are unassociated with a ventricular event and how manyatrial events are associated with a ventricular event (120). The episodeclassifier 318 may look for approximately consistent AV intervals foratrial events associated with a ventricular event. If the number ofatrial events part of an AV interval is above a predetermine threshold,then the cardiac episode is classified as SVT for the NF EGM channel(158) by episode classifier 318.

If the number of unassociated atrial events is below a predeterminedthreshold, then, as discussed above, the data associated with theepisode is examined to determine whether RR intervals with differentlengths have approximately the same morphology (150). In some examplesthe maximum and minimum intervals in the episode are compared and, ifthe difference in interval value is greater than a predeterminedthreshold, such as 100 ms for example, then the morphology of themaximum interval is compared to the morphology of the minimum interval.If the morphologies are found to correlate, the episode is classified asSVT for the FF EGM channel (158). As described above, if the maximum andminimum intervals are not found to correlate, then the morphologies ofeach of the intervals associated with detection of a cardiac episode arecompared with a template or templates stored in memory 92, the templateor templates being FF VT templates. Episode classifier 318 determinesfor each of the intervals whether the correlation of the morphologybetween the interval and the template is greater than a predeterminedcorrelation threshold. If the number of intervals having morphologiesthat correlate to the stored template is greater than a predeterminedmatching percentage threshold, then the episodes is classified as beingVT/VF for the FF EGM channel (156). If the number of intervals thatmatch is below the matching percentage threshold, then the episode isclassified as unknown for the FF EGM channel (132).

FIG. 6C illustrates an example algorithm for determining a finalclassification for an episode detected by IMD 16 that in some examplesis based on both an NF classification and a FF classification. Processor86 retrieves the results for FF EGM classification (160) and the resultfrom NF EGM classification (162) from memory 92. Episode classifier 318determines whether the result from one of the channels is VOS (161). Insome examples where f either the NF channel EGM or the FF channel EGMhas been classified as VOS the final classification is VOS (163) Episodeclassifier 318 determines if both the results are unknown (164). If bothresults are unknown, then the final classification is unknown (166).Episode classifier 318 then determines if the NF EGM result is “unknown”(168). If the NF EGM result is unknown, then the final classification isthe FF EGM result (170). If the NF EGM result is not unknown, thenprocessor 86 determines if the FF EGM result is “unknown” (172). If theFF EGM result is not unknown, then the final classification is the FFEGM result (170). If the FF EGM result is unknown, then the finalclassification if the NF EGM result (174). The use of both NF and FFchannels results in more of the detected episodes evaluated by processor86 being classified as either VT/VF or SVT. In turn, the increase in“known” classifications results in greater understanding of how well IMD16 is performing.

FIG. 7 is a flow chart illustrating an episode classification algorithmthat classifies an episode based on EGM signal data associated with anepisode detected by IMD 16. The example in FIG. 7, the episodeclassification algorithm is presented without regard to a NF or FFchannel. However, one of skill in the art would understand that theepisode classification algorithm shown in FIG. 7, and in particular theuse of a sinus beat template, may be used with the classificationalgorithm of FIG. 6A-6C.

Episode classifier 318 selects a detected EGM episode (100) from storedepisodes 94. Episode classifier 318 determines whether the EGM datareceived from IMD 16 includes spontaneous and regular sensing (192),i.e., not induced. In some examples, a method of determining whetherdata previously utilized by a device to identify a cardiac episodecorrespond to regular sensing of events includes a determination as towhether over-sensing or under-sensing has occurred. The determination ofover-sensing or under-sensing may be based on a determination of whetherone of a predetermined number of over-sensing or under-sensing criteriahas been met. An example of an over-sensing criterion includes theexistence of simultaneous atrial and ventricular events, except ininstances where the ventricular event is ventricular Pace for ATP. Anexample of an under-sensing criterion includes determining whether atleast one sensed AA interval associated with predetermined beats, suchas the NID ventricular beats prior to detection of the episode and theatrial interval immediately subsequent to the detection of the episodeis greater than a predetermined interval, such as 2500 ms, for example.Another example of under-sensing criteria include determining whetherthe atrial channel includes less than a predetermined number of eventsprior to detection. Other examples of over-sensing or under-sensingcriteria are taught in U.S. Pat. No. 7,894,883 to Gunderson et al.,incorporated herein by reference in its entirety. If an episode is foundto be either not spontaneous or not include regular sensing, the episodeis classified as unknown or VOS (194). The episode may be classified asVOS if episode classifier 318 determines that over-sensing is present.

In response to a determination that the episode received from IMD 16 isspontaneous and includes regular sensing, Episode classifier 318determines if one or more sinus beat templates may be stored (196). Indetermining whether an episode includes and appropriate sinus beat foruse as a template, episode classifier 318 determines whether severalfactors are present in the EGM signal. As described in more detail belowwith respect to FIGS. 10 and 11, episode classifier 318 determineswhether the A to V ratio is 1:1. As discussed above, in order for anepisode to have a 1:1 distribution, there needs to be the same number ofatrial events and ventricular events, and the events must alternate.Episode classifier 318 then looks for a portion of the episode include aPR interval greater than a first predetermined threshold. In someexamples, the first predetermined is approximately 80 ms. Episodeclassifier 318 also looks for a portion of the episode that includes anRR interval greater than a second predetermined threshold. In someexamples, the second predetermined threshold is approximately 500 ms.Episode classifier 318 also looks for a portion of the episode thatincludes two consecutive RR interval values within less than a thirdpredetermined threshold of each other. In some examples, the thirdpredetermined threshold may be approximately 50 ms. For example, asshown in FIG. 12, the RR intervals leading to selection are 730 ms and750 ms. If an interval is found to fulfill the requirements than a sinustemplate may be stored (198) in memory 92. In some examples a sinustemplate may be selected from an episode that has been classified by IMD16 or programmer 24 as SVT. Processor 86 selects one of thepre-detection ventricular beats and stores the beat as a sinus template.In some examples, processor 86 may store additional templates fordifferent channels that correspond to the beat selected. The additionaltemplates may be stored to correspond to different electrodeconfigurations. In some examples, multiple sinus template may be storedover time to correspond to multiple different electrode configurations.

Episode classifier 318 determines the A/V ratio of the beats precedingdetection (200). The ratio of atrial sensed events to ventricular sensedevents is determined for a predetermined window of sensed eventsoccurring prior to detection by IMD 16 of the cardiac episode. In someexamples, the predetermined window used for calculating the A/V ratiomay be defined by the last 12 ventricular sensed events occurring justprior to the point of detection of the cardiac episode. It is understoodthat the window may be defined by any predetermined number ofventricular sensed events prior to detection. The number of atrialsensed events occurring within the window is then determined and used todetermine the A/V ratio. If the number of atrial sensed events occurringduring the window is equal to the number of ventricular sensed events, adetermination is made as to whether the atrial sensed events are evenlydistributed with the ventricular sensed events, that is, whether thereis a 1:1 distribution prior to detection (202). If there is one atrialsensed event located between each adjacent pairs of all of theventricular sensed events, the episode is identified as being asupraventricular tachycardia (SVT) episode (206). The rationale behindthis classification is that a ventricular arrhythmia would have ashorter ventricular cycle length than the atrial cycle length at somepoint in the episode.

If the atrial sensed events are determined to be not evenly distributedwith the ventricular sensed events in a one to one distribution (202)the classification of the episode is further evaluated. Episodeclassifier 318 may determine which chamber is leading (204). Episodeclassifier 318 determines whether the heart rhythm was initiated byconduction in the ventricle or in the atria. In some examples, an onsetthreshold is determined. Once the onset threshold has been determined, aspatial reference point is identified and used to form a window fordetermining whether conduction of the heart rhythm was imitated by oneof the atrial and the ventricular chambers. For example, an RR intervalassociated with pre-NID or sinus rhythm, i.e., greater than the onsetthreshold, occurring prior to an interval correspond to when the episodewas detected, may be used as the spatial reference point for forming thewindow. In some examples, the spatial reference point may be identifiedby determining by working backwards from the detection until apredetermined number of sequential adjacent intervals occurring prior tothe interval associated with the detection is greater than the onsetthreshold. Other examples of determining a spatial reference point andwindow for determining which chamber is leading may be found in U.S.Pat. No. 7,894,883 to Gunderson et al., incorporated herein by referencein its entirety.

Determining which chamber is leading (204) may include identifying aspatial reference point, as wells as a predetermined number of intervalscentered around the determined spatial reference point. Episodeclassifier 218 determines the number of sensed atrial events occurringbetween each interval within the window. If there is one atrial sensedevent between each of the adjacent ventricular sensed vents in thewindow, episode classifier 318 determines that the atrium is initiatingconduction. In response to a determination that the atrium is leading,episode classifier 318 classifies the episode as SVT (206). If there isone atrial sensed event between adjacent ventricular sensed events forall except one of the ventricular sensed event intervals, and no atrialsensed events between one set of adjacent ventricular sensed events,then episode classifier 318 determines that the ventricles areinitiating conduction. If the ventricles are found to be leading,episode classifier 318 classifies the episode as a ventriculartachycardia/ventricular fibrillation (VT/VF) episode (212). If there isone atrial sensed event between each of the adjacent ventricular sensedevents for less than the number of intervals minus one, and no atrialsensed event between adjacent ventricular sensed events for more thanone of the intervals, then neither the atrium nor the ventricles aredetermined to be driving conduction. If no determination is made, thenepisode classifier 318 continues to attempt to classify the episodebased on whether the effects the effects of anti-tachycardia pacing(ATP) are indicative of a supraventricular tachycardia episode.

Episode classifier 318 may determine whether the cycle length betweenatrial events, that is, the interval between P-waves is the same duringthe episode being classified as during an antitachycardia pacing regimenpreviously applied to the patient (208). In some examples, adetermination about the effects of anti-tachycardia pacing is made usinga method of dynamic discrimination described in commonly assigned U.S.Pat. No. 7,317,942, issued Jan. 8, 2008, entitled “DYNAMICDISCRIMINATION UTILIZING ANTI-TACHY PACING THERAPY IN AN IMPLANTABLEMEDICAL DEVICE” to Brown et al., and incorporated herein by reference inits entirety. For example, instances where IMD 16 delivered anantitachycardia pacing regimen may be identified by IMD 16 or programmer24 and the corresponding EGM signal data may be stored in memory 92. TheEGM signal associated with the therapy may be reviewed to determine amean cycle length between atrial events occurring prior to the deliveryof the antitachycardia pacing therapy and comparing the determinedatrial cycle length during the delivery of the pacing therapy to a meancycle atrial cycle length during the episode. If the difference betweenthe mean atrial cycle and the atrial cycle length during the delivery ofthe pacing therapy is less than or equal to a predetermined atrial cyclelength threshold, such as 30 ms for example, the episode is classifiedas being a SVT (206). If the difference between the mean atrial cyclelength for the episode and the atrial cycle length during the deliveryof the pacing therapy is greater than the predetermined threshold thenepisode classifier 318 continues with the classification algorithm.

If the PP interval (or atrial cycle) of the episode is not the same asthe atrial cycle length during ATP, then the morphology of a maximuminterval within the episode being classified and the minimum intervalwithin the episode being classified are compared. Episode classifier 318determines whether the intervals have the same morphology despite havingdifferent RR interval lengths (218). In some examples, the comparisonoccurs if the difference between the maximum interval and the minimuminterval is greater than a predetermined threshold. A determination isthen made as to whether the correlation between the morphologies of thetwo intervals is greater than a predetermined correlation threshold,such as 0.94, for example.

If the correlation between the two intervals is greater than thepredetermined correlation threshold, then the detected episode isclassified as being SVT (206). If the correlation is below thepredetermined correlation threshold, or the difference between themaximum and minimum intervals is below the predetermined threshold fordifference between the two intervals, then the morphology of theintervals within the episode are compared to a VT template. Episodeclassifier 318 determines how many of the intervals have a morphologythat matches the VT template (220). The VT template may be one of moreVT templates stored within memory 92. In some examples the VT templatemay have been stored during the classification of a previous episodefrom the same patient. Episode classifier 318 compares each intervalwithin the episode with the VT template and determines whether eachinterval correlates to the VT template based on a predeterminedcorrelation threshold. If the number of intervals having morphologiesthat correlate to the VT template is above a predetermined matchingpercentage threshold, then the morphology for the episode is determinedto match the template. In response, the episode is classified at VT/VF(212). If the number of intervals having morphologies that correlate tothe VT template is below the predetermined matching percentagethreshold, then the episode is classified as unknown (195). The matchingpercentage threshold may be programmable by a default, or may beadjusted by the clinician or other user. In some examples the thresholdmay be adjusted on a patient-by-patient or clinic-by clinic basis. Insome examples, the matching percentage threshold may be betweenapproximately 70% and 85%. In some examples, the matching percentage maybe approximately 80%.

In the episode that the A/V ratio during the beats preceding detection(196) is such that the number of atrial sensed events is below thenumber of ventricular sensed events within a window preceding detection,then an interval may be stored as a VT template (210). The episode isclassified as VT/VF (212). In some examples, the difference between thenumber of atrial sensed events and the number of ventricular sensedevents must be greater than 1.

In response to an A/V ratio during the beats preceding a detection (200)where the number of atrial sensed events is greater than the number ofventricular sensed events, episode classifier 318 determines whether thedata used by IMD 16 during the initial classification of the episodeincludes RR intervals that are regular, and whether the PR intervals arestable (214). In an example to illustrate how processor 86 determineswhether the RR intervals are regular and whether the PR intervals arestable (214), an episode being processed includes a number of intervalsto detection (NID) of 16 intervals. That is, during the initialdetection process IMD 16 detected the occurrence of a cardiac episodeonce the detection criteria had been met, i.e., once 16 intervals havinga rate lower than the threshold rate were detected. In some examples,IMD 16 continuously stores a buffer containing a number of the mostrecent intervals of the EGM signal. This may allow IMD to store an EGMsignal including all 16 intervals resulting in detection to memory 72after detection. In order to determine whether the data used by IMD 16during the initial classification of the episode as a detected episodeincludes intervals that are regular a modesum of the 16 RR intervalsresulting in detection is generated by determining whether the number ofintervals in the two highest modes (i.e., most frequent bins) is greaterthan a predetermined percentage of the number of RR intervals. Thepercentage may be 67%, for example. If the number of intervals in thetwo highest modes is above the percentage threshold, then the data isconsidered to include regular RR intervals.

Episode classifier 318 also determines whether the AV intervalsassociated with the initial identification of the episode as a cardiacepisode are stable. For example, in order to determine whether the AVintervals associate with the initial identification of the episode as acardiac episode are stable, PR intervals, i.e., the time between anatrial sensed event and a subsequent ventricular sensed event, aredetermined for each of the 16 intervals. In some examples, in order toreduce the effect of outliers, once the PR intervals are determined foreach of the intervals associated with the initial identification of theepisode as a cardiac episode, a predetermined number of maximum PRintervals and minimum PR intervals are removed. For example, one-sixthof the maximum PR intervals and one sixth of the minimum PR intervalsmay be removed. A PR range is then determined as the difference betweenthe minimum PR interval and the maximum PR interval. Episode classifier318 then determines whether the range of PR intervals satisfies a PRstable criterion. For example, a determination may be made as to whetherthe range of the remaining PR intervals is less than 20 ms. In responseto a determination that the RR intervals are regular and the PRintervals are stable, the episode is classified as SVT (206). If episodedoes not include both regular RR intervals and stable PR intervals thenepisode classifier 318 determiners how many atrial sensed events areunassociated with a ventricular sensed event and how many atrial eventsare associated with a ventricular event (120). The episode classifier318 may look for approximately consistent AV intervals for atrial sensedevents associated with a ventricular sensed event. If the number ofatrial sensed events part of an AV interval is above a predeterminethreshold, then the cardiac episode is classified as SVT for the NF EGMchannel (158) by episode classifier 318.

If the number of unassociated atrial events is below a predeterminedthreshold, as discussed above, the data associated with the episode isexamined to determine whether RR intervals with different lengths haveapproximately the same morphology (218). In some examples the maximumand minimum intervals in the episode are compared and, if the differencein interval value is greater than a predetermined threshold, such as 100ms for example, then the morphology of the maximum interval is comparedto the morphology of the minimum interval. If the morphologies are foundto correlate, the episode is classified as SVT (206). As describedabove, if the maximum and minimum intervals are not found to correlate,then the morphologies of each of the intervals associated with detectionof a cardiac episode are compared with a template or templates stored inmemory 92, the template or templates being VT templates. Episodeclassifier 318 determines for each of the intervals whether thecorrelation of the morphology between the interval and the template isgreater than a predetermined correlation threshold. If then number ofintervals having morphologies that correlate to the stored template isgreater than a predetermined matching percentage threshold, than theepisodes is classified as being VT/VF (220). If the number of intervalsthat match is below the matching percentage threshold, then episodeclassifier 318 determines if the morphology of the intervals matches asinus template (222).

Determining whether the morphology of the episode matches a sinustemplate (222) is performed in a manner similar to the one used todetermine if the morphology of the episode matches a VT template (220).The morphologies of each of the intervals within the episode arecompared with a sinus template or templates stored in memory 92. Aparticular sinus template may be selected based on, for example, themost common morphology at time of possible collection of a template, orwaveform average. In some examples, a particular sinus template may beselected based on the channel of the EGM signal being analyzed. Episodeclassifier 318 determines for each of the intervals whether thecorrelation between the morphologies of the interval and the sinustemplate is greater than a predetermined correlation threshold. If thenumber of intervals having morphologies that correlate to the storedtemplate is greater than a predetermined matching percentage threshold,then the episode is classified as SVT (206). If the number of intervalsthat match is below the matching percentage threshold, then the episodeis classified as unknown (194).

FIG. 8 is flow chart illustrating a method of classifying an episodewhen the ratio of atrial sensed event and ventricular sensed event is1:1. The method may be used with algorithm illustrated in FIGS. 6A-6C orthe algorithm in FIG. 7. The method may also be used for real timeclassification of an EGM signal by IMD 16. As discussed above withrespect to FIGS. 6A, 6B and 7, in order to determine that the ratio ofatrial sensed events to ventricular sensed events is 1:1 (176) episodeclassifier 318 determines if each of the adjacent ventricular sensedevents is separated by a single atrial sensed event. When used as partof a larger classification scheme, if there is not a 1:1 ratio betweenatrial sensed events and ventricular sensed events, episode classifier318 may move to the next step in the classification algorithm. If theatrial sensed events and ventricular sensed events are appropriatelyinterleaved, then episode classifier 318 determines the beat to beatcycle lengths of RR intervals and PP intervals (178). Using thedetermined cycle lengths, processor 86 determines if there are cyclelength changes for the RR intervals or the PP intervals (180). In someexamples, consecutive intervals, either RR intervals or PP intervals,are not classified as having a change in cycle length if the variationin the interval length is less than a predetermined threshold. In someexamples, the predetermined threshold may be 10% of the previous cyclelength. The use of a threshold removes minor fluctuations in the cyclelength. In some examples, episode classifier 318 determines thedirection of the change in interval length.

Episode classifier 318 compares changes in the beat to beat cyclelengths of the RR intervals and the PP intervals (182). The processorcompares changes in RR intervals to any changes in PP intervals, andvice versa, for intervals in approximately the same time period. For agiven comparison processor 86 may determine which interval changed firstand whether the interval lengths changed in the same direction, i.e.,both increasing or both decreasing. Episode classifier 318 thendetermines if the RR intervals or the PP intervals consistently leadschanges in the beat to beat cycle lengths (184). The episode is thenclassified based on the change leader (186). If the atrial sensed eventsand corresponding PP intervals lead changes in interval length then theepisode is classified as SVT. If the ventricular sensed events andcorresponding RR intervals lead the changes in interval length then theepisode is classified as VT/VF. If there are no changes in intervallength or there is not a consistent leader to the changes in intervallength, then the episode is not classified.

FIG. 9A is an example marker channel 228 having a 1:1 ratio. As shown inFIG. 9A, each ventricular sensed event V_(s) is separated by an atrialsensed event A_(s). In marker channel 228 changes in the interval lengthbetween the atrial sensed events consistently lead the changes in theinterval length between ventricular sensed events. For example, PPinterval 230 is shorter than preceding PP interval. RR interval 232 isalso shorter than the preceding RR interval. Because interval 230 startsbefore interval 232, interval 230 is considered to be leading the changein interval length. Throughout the portion of marker channel 228depicted the length of time between atrial sensed events changes beforethe length of time between ventricular sensed events changes. Using themethod described in FIG. 8, an episode including marker channel 228would be classified as SVT.

FIG. 9B is an example marker channel 238 having a 1:1 ratio. As shown inFIG. 9B, each ventricular sensed event V_(s) is separated by an atrialsensed event A_(s). In marker channel 238 changes in the interval lengthbetween the ventricular sensed events consistently lead the changes inthe interval length between atrial sensed events. For example, RRinterval 236 is shorter than the preceding RR interval. PP interval 234is also shorter than the preceding PP interval. Because interval 236starts before interval before interval 234, interval 236 is consideredto be leading the change in interval length. Throughout the portion ofmarker channel 238 depicted the length of time between ventricularsensed events V_(s) changes before the length of time between atrialsensed events A_(s). Using the method described in FIG. 8, an episodeincluding marker channel 238 would be classified as VT/VF.

With regards to FIGS. 8, 9A and 9B, if either RR interval or the PPinterval consistently leads with respect to beat to beat cycle lengthchanges, then it is most likely contraction is originating in a locationcorresponding to the respective portion of the EGM signal. A P-wavecorresponds to contraction of the atrium. Accordingly, if any changes incycle length show up in the PP interval first, contraction of the heartis most likely starting in the atrium. Similarly, an R-wave correspondsto contraction in the ventricles. Accordingly, if any changes in cyclelength show up in the RR interval first, contraction of the heart ismost likely starting in the ventricles. Based on this association onecan reasonably assume that if an arrhythmia is occurring that is led bythe atrium, it is a supraventricular tachycardia, and if the arrhythmiais led by the ventricles it is either ventricular tachycardia orventricular fibrillation.

FIG. 10 depicts an example method of selecting a sinus template duringanti-tachycardia pacing (ATP). The method may be implemented by eitherIMD 16 or an external device such as programmer 24. A processor, such asprocessor 70 or processor 86, determines if ATP has been provided 240.If not, then the device continues to monitor the EGM signal (246). IFATP has been provided (240), then the processor next determines if theRR interval has increased by at least 100 ms (242) from pre diagnosis ofarrhythmia and application of ATP to post-ATP. An increase in RRinterval by 100 ms or more may indicated that the ATP has beensuccessful. The processor then determines if there is a 1:1 A:V post-ATPrhythm (244). As discussed above a 1:1 AV rhythm comprises a markerchannel with alternating atrial sensed events and ventricular sensedevents, where there are no occurrences of two of the same time of eventin a row. The processor next determines if the PR interval is greaterthan 80 ms (248). Processor 86 also determines if the post ATP signalinclude an RR interval greater than 500 ms (250). Processor 86 alsodetermines if there are two consecutive RR interval values within 50 ms(252). The processor 86 selects one of the sensed ventricular EGMs andstores the selected sensed ventricular EGM as a template (254).

A template collected according to the method of FIG. 10 may be used byan external device as part of a classification algorithm. The templatemay also be used during real time detection by the IMD 16 to strengthenor make a decision regarding diagnosis. For example. If the currentheart rate is within the VT/VF zone, then the current morphology iscompared to the sinus template. If a match is found, IMD withholdsdetection of VT/VF. If the two do not match, a normal VT/VF algorithmmay continue.

FIG. 11 depicts an example method of selecting a sinus template based onan EGM signal prior to diagnosis of a cardiac episode by IMD 16. Episodeclassifier 318 monitors the EGM signals prior to detection of atreatable rhythm (258) within an episode provided by IMD 16 toprogrammer 24. Episode classifier 318 determines if there were moreventricular events than atrial events prior to detection (260) anddiagnosis. If there are not more ventricular events than atrial eventsin the episode prior to detection then the attempt to collect a sinustemplate ends (262). If there are more ventricular sensed events thanatrial sensed events, the processor determines if the signal prior toonset includes a portion that has a 1:1 A:V rhythm (264). If there is aportion with a 1:1 A:V rhythm, then processor 86 determines if there isa PR interval that is greater than 80 ms (266) in the portion of theepisode with a 1:1 A:V rhythm. The processor also determines if there isan RR interval greater than 500 ms (268). The last requirement forselecting an interval to save as a template is the presence of twoconsecutive sensed RR intervals values within less than 50 ms of eachother (270). If any of the requirements are missing, then the processends (262) and no template is collected. If all are present, thenEpisode classifier 318 grabs one of the sensed intervals and stores itas a sinus template (272). The interval selected is one of theventricular sensed EGM that is close together.

FIG. 12 includes an EGM signal 280 including successful anti-tachycardiapacing 282 and an interval 284 that is appropriately selected as a sinustemplate. EGM signal fits the criteria as outlined in FIG. 10. Aninterval 284 is selected and stored separately for use as a sinustemplate in various classification algorithms.

FIG. 13 includes EGM signals 300 and 302 including a pre-onset ofepisode period 304. As shown in FIG. 13, the portions within the dottedboxes, 308A and 308B, are collected sinus templates for the respectiveEGM signal channels. The ventricular template may be selected based onthe method put forth in FIG. 11.

The techniques described in this disclosure may be implemented, at leastin part, in hardware, software, firmware, or any combination thereof.For example, various aspects of the techniques may be implemented withinone or more microprocessors, digital signal processors (DSPs),application specific integrated circuits (ASICs), field programmablegate arrays (FPGAs), or any other equivalent integrated or discretelogic circuitry, as well as any combinations of such components,embodied in programmers, such as physician or patient programmers,stimulators, or other devices. The terms “processor,” “processingcircuitry,” “controller” or “control module” may generally refer to anyof the foregoing logic circuitry, alone or in combination with otherlogic circuitry, or any other equivalent circuitry, and alone or incombination with other digital or analog circuitry.

For aspects implemented in software, at least some of the functionalityascribed to the systems and devices described in this disclosure may beembodied as instructions on a computer-readable storage medium such asrandom access memory (RAM), read-only memory (ROM), non-volatile randomaccess memory (NVRAM), electrically erasable programmable read-onlymemory (EEPROM), FLASH memory, magnetic media, optical media, or thelike. The instructions may be executed to support one or more aspects ofthe functionality described in this disclosure.

Various embodiments of the invention have been described. These andother embodiments are within the scope of the following claims.

What is claimed is:
 1. A method comprising: collecting a sinus templatefrom a first ventricular EGM signal, wherein the sinus templatecomprises a portion of the first ventricular EGM signal including atleast one ventricular beat, and wherein collecting the sinus templatecomprises collecting the sinus template from a portion of theventricular EGM that occurred when the ventricular EGM signal and anatrial EGM signal indicated a one to one ratio of atrial events toventricular events, a P-R interval greater than a first predeterminedthreshold, an R-R interval greater than a second predeterminedthreshold, and two consecutive R-R intervals within a predeterminedrange; comparing the sinus template to a second ventricular EGM signal;and determining, based on the comparison, whether the morphology of thesecond ventricular EGM signal matches the sinus template.
 2. The methodof claim 1, wherein the sinus template comprises a portion of the firstventricular EGM signal adjacent and subsequent to an anti-tachycardiapacing period.
 3. The method of claim 2, wherein collecting the sinustemplate comprises collecting the sinus template when the portion of thefirst ventricular EGM signal adjacent and subsequent to theanti-tachycardia pacing period comprises an R-R interval that hasincreased by at least about 100 milliseconds (ms) from a preanti-tachycardia pacing R-R interval.
 4. The method of claim 1, whereinthe sinus template comprises a portion of the first ventricular EGMsignal prior and adjacent to onset of a cardiac arrhythmia episode. 5.The method of claim 1, further comprising preforming real-time diagnosisof cardiac arrhythmia based on the sinus template by an implantablemedical device.
 6. The method of claim 1, further including determiningwhether a cardiac arrhythmia diagnosis previously made by an implantablemedical device was correct based on the sinus template.
 7. The method ofclaim 1, further comprising: determining whether a morphology of thesecond ventricular EGM signal and a morphology of the sinus templatematch; and classifying an episode including the second ventricular EGMsignal as a supraventricular tachycardia in response to determining thatthe morphologies match.
 8. The method of claim 7, wherein determiningwhether the morphologies match comprises comparing each of a pluralityof intervals of the second ventricular EGM signal to the sinus template;determining, based on the comparison, a level of correlation betweeneach of the plurality of intervals and the sinus template; classifyingeach of the plurality of intervals as matched or unmatched based on apredetermined threshold for level of correlation; comparing a percentageof intervals classified as matched to a predetermined matchingpercentage threshold, and determining that the morphologies match inresponse to the percentage of intervals classified as matched beingabove the predetermined matching percentage threshold.
 9. The method ofclaim 1, further comprising comparing an episode comprising the secondventricular EGM signal to a VT template, and: in response to a matchbetween the episode and the VT template classifying the episode asventricular tachycardia or ventricular fibrillation; and in response tono match between the episode and the VT template, comparing the episodeto the sinus template.
 10. The method of claim 1, wherein the firstpredetermined threshold is about 80 ms, the second predeterminedthreshold is about 500 ms, and the predetermined range is about 50 ms.11. A device comprising: a processor configured to collect a sinustemplate from a first ventricular EGM signal, wherein the sinus templatecomprises a portion of the first ventricular EGM signal including atleast one ventricular beat, and wherein collecting the sinus templatecomprises collecting the sinus template from a portion of theventricular EGM that occurred when the ventricular EGM signal and anatrial EGM signal indicated a one to one ratio of atrial events toventricular events, a P-R interval greater than a first predeterminedthreshold, an R-R interval greater than a second predeterminedthreshold; and two consecutive R-R intervals within a predeterminedrange; compare the sinus template to a second ventricular EGM signal,and determine, based on the comparison, whether the morphology of thesecond ventricular EGM signal matches the sinus template.
 12. The deviceof claim 11, further including a sensing module configured to receivethe EGM signal from electrodes coupled to the device.
 13. The device ofclaim 11, wherein the sinus template comprises a portion of the firstventricular EGM signal adjacent and subsequent to an anti-tachycardiapacing period.
 14. The device of claim 13, wherein collecting the sinustemplate comprises collecting the sinus template when the portion of thefirst ventricular EGM signal adjacent and subsequent to theanti-tachycardia pacing period comprises an R-R interval that hasincreased by at least about 100 ms from a pre anti-tachycardia pacingR-R interval.
 15. The device of claim 11, wherein the device is animplantable medical device and the processor is further configured topreform real time diagnosis of cardiac arrhythmia based on the sinustemplate.
 16. The device of claim 11, wherein the processor is furtherconfigured to determine whether a cardiac arrhythmia diagnosispreviously made by the implantable medical device was correct based onthe comparison of the second ventricular EGM signal to the sinustemplate.
 17. The device of claim 11, wherein the processor is furtherconfigured to determine whether a morphology of the second ventricularEGM signal and a morphology of the sinus template match; and classify anepisode including the second ventricular EGM signal as asupraventricular tachycardia in response to determining that themorphologies match.
 18. The device of claim 17, wherein the processor iffurther configured to make the determination whether the morphologiesmatch by comparing each of a plurality of intervals of the secondventricular EGM signal to the sinus template; determining, based on thecomparison, a level of correlation between each of the plurality ofintervals and the sinus template; classifying each of the plurality ofintervals as matched or unmatched based on a predetermined threshold forlevel of correlation; comparing a percentage of intervals classified asmatched to a predetermined matching percentage threshold, anddetermining that the morphologies match in response to the percentage ofintervals classified as matched being above the predetermined matchingpercentage threshold.
 19. The device of claim 11, wherein the processorif further configured to compare an episode comprising the second EGMsignal to a VT template, and in response to a match between the episodeand the VT template classify the episode as ventricular tachycardia orventricular fibrillation; and in response to no match between theepisode and the VT template, compare the episode to the sinus template.20. The device of claim 11, wherein the first predetermined threshold isabout 80 ms, the second predetermined threshold is about 500 ms, and thepredetermined range is about 50 ms.
 21. A device comprising: means forcollecting a sinus template from an EGM signal; the sinus templatecollected when the EGM signal has a one to one ratio of atrial events toventricular events, a P-R interval greater than 80 milliseconds (ms), anR-R interval greater than 500 ms; and two consecutive R-R intervalswithin 50 ms of each other; means for comparing the sinus ventricularbeat template to a second EGM signal, and means for determining, basedon the comparison, whether the morphology of the second EGM signalmatches the sinus template.
 22. A computer-readable medium containinginstructions, the instructions causing a programmable processor to:collect a sinus template from a first ventricular EGM signal, whereinthe sinus template comprises a portion of the first ventricular EGMsignal including at least one ventricular beat, and wherein collectingthe sinus template comprises collecting the sinus template from aportion of the ventricular EGM that occurred when the ventricular EGMsignal and an atrial EGM signal indicated a one to one ratio of atrialevents to ventricular events, a P-R interval greater than a firstpredetermined threshold, an R-R interval greater than a secondpredetermined threshold; and two consecutive R-R intervals within apredetermined range; compare the sinus template to a second ventricularEGM signal, and determine, based on the comparison, whether themorphology of the second ventricular EGM signal matches the sinustemplate.